import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';
export type MemoryInfoDocumentType = HydratedDocument<MemoryInfo>;


@Schema()
export class MemoryInfo {
    @Prop({ required: true, index: true })
    manufacturers: string; // 制造商
    
    @Prop({ required: true, index: true })
    capacity: string; // 容量
    
    @Prop({ required: true, index: true })
    type: string; // 内存类型
    
    @Prop({ required: true, index: true })
    frequency: string; // 频率
    
    @Prop({ required: true, index: true })
    price: number; // 价格
    
    @Prop({ required: true, index: true })
    img_url_arr: string[]; // 图片地址
    
    @Prop({ required: true, index: true })
    score: number; // 性能评分
}

export const MemoryInfoSchema = SchemaFactory.createForClass(MemoryInfo);
